package cn.schoolwow.quickflow.test.flow;

import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import cn.schoolwow.quickflow.flow.HasFlowConfig;
import com.alibaba.fastjson.JSONObject;
import org.junit.Assert;

public class RequestDataBusinessFlow implements BusinessFlow, HasFlowConfig {
    @Override
    public void executeBusinessFlow(FlowContext flowContext) throws Exception {
        String data = (String) flowContext.checkData("初始化数据");
        Assert.assertEquals(data, "123456");
    }

    @Override
    public String name() {
        return "初始化加载流程数据";
    }

    @Override
    public String flowConfigCategoryName() {
        return "测试";
    }

    @Override
    public void setRequestData(JSONObject requestData) {
        requestData.put("初始化数据", "123456");
    }
}
